<?php

namespace App\Transformers;

use App\Models\User;

class ManagementTransformer extends Transformer
{
    public function transform(User $management)
    {
        return [
            'id'                => $management->id,
            'attendance_no'     => $management->attendance_no,
            'teambition_sign'     => $management->teambition_sign,
            'name'              => $management->name,
            'department_name'   => $management->department->name,
            'entry_date'        => $management->entry_date,
            'leave_date'        => $management->leave_date,
            'status'            => $management->status,
            'created_at'        => $management->created_at->format('Y-m-d H:i:s'),
        ];
    }
}
